*
* @file
*/
+use MediaWiki\MediaWikiServices;
/**
* Base class for template-based skins.
}
}
+ $linkClass = MediaWikiServices::getInstance()->getLinkRenderer()->getLinkClasses( $title );
+
// wfMessageFallback will nicely accept $message as an array of fallbacks
// or just a single key
$msg = wfMessageFallback( $message )->setContext( $this->getContext() );
return $result;
}
- return [
+ $result = [
'class' => implode( ' ', $classes ),
'text' => $text,
'href' => $title->getLocalURL( $query ),
'primary' => true ];
+ if ( $linkClass !== '' ) {
+ $result['link-class'] = $linkClass;
+ }
+
+ return $result;
}
function makeTalkUrlDetails( $name, $urlaction = '' ) {